home *** CD-ROM | disk | FTP | other *** search
- /* Dispatcher.c */
-
- #include <Types.h>
- #include <Quickdraw.h>
- #include <Controls.h>
- #include <Dialogs.h>
- #include <Events.h>
- #include <Lists.h>
- #include <Menus.h>
- #include <TextEdit.h>
-
- #include "TemperatureApp.h"
- #include "TemperatureDoc.h"
- #include "TemperatureEngine.h"
- #include "MainWindow.h"
- #include "AboutDialog.h"
-
- #include "Globals.h"
- #include "Dispatcher.h"
-
- /*----------*/
- void DoIdle (void)
- {
- }
-
- //----------
- // windows
-
- //----------
- void Close (
- AMWindow* window)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_Close ((MainWindow*) window);
- break;
- } // switch
- }
-
- //----------
- void DoTrack (
- AMWindow* window,
- ControlHandle whichControl,
- short whichPart,
- Point where)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_Track ((MainWindow*) window, whichControl, whichPart, where);
- break;
- } // switch
- }
-
- //----------
- void MouseIn (
- AMWindow* window,
- Point where,
- short modifiers)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_MouseIn ((MainWindow*) window, where, modifiers);
- break;
- } // switch
- }
-
- //----------
- void TypeIn (
- AMWindow* window,
- char ch)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_TypeIn ((MainWindow*) window, ch);
- break;
- } // switch
- }
-
- //----------
- void Resize (
- AMWindow* window)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_Resize ((MainWindow*) window);
- break;
- } // switch
- }
-
- //----------
- void Scroll (
- AMWindow* window,
- short newValue,
- short oldValue)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_Scroll ((MainWindow*) window, newValue, oldValue);
- break;
- } // switch
- }
-
- //----------
- Boolean DoCommand (
- AMWindow* window,
- long inCommand)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- return MainWindow_DoCommand ((MainWindow*) window, inCommand);
- break;
- } // switch
- return false;
- }
-
- //----------
- void ExitCurField (
- AMWindow* window)
- {
- switch (GetClassID (window)) {
- case classMainWindow:
- MainWindow_ExitCurField ((MainWindow*) window);
- break;
- } // switch
- }
-
- //----------
- void DataChanged (
- AMResponder* responder,
- long inDataID)
- {
- switch (GetClassID (responder)) {
- case classMainWindow:
- MainWindow_DataChanged ((MainWindow*) responder, inDataID);
- break;
- case classAboutDialog:
- AboutDialog_DataChanged ((AboutDialog*) responder, inDataID);
- break;
- } // switch
- }
-
- //----------
- // dialogs
-
- //----------
- void FinishMake (
- AMDialog* dialog)
- {
- switch (GetClassID (dialog)) {
- case classAboutDialog:
- AboutDialog_FinishMake ((AboutDialog*) dialog);
- break;
- } // switch
- }
-
- //----------
- void ConnectToData (
- AMDialog* dialog,
- AMSignaler* inData)
- {
- switch (GetClassID (dialog)) {
- case classAboutDialog:
- AboutDialog_ConnectToData ((AboutDialog*) dialog, inData);
- break;
- } // switch
- }
-
- //----------
- void DoItem (
- AMDialog* dialog,
- SInt16 inItemHit)
- {
- switch (GetClassID (dialog)) {
- case classAboutDialog:
- AboutDialog_DoItem ((AboutDialog*) dialog, inItemHit);
- break;
- } // switch
- }
-
- //----------
- Boolean Filter (
- AMDialog* dialog,
- EventRecord *ioEvent,
- DialogItemIndex *outItemHit)
- {
- switch (GetClassID (dialog)) {
- case classAboutDialog:
- return AboutDialog_Filter ((AboutDialog*) dialog, ioEvent, outItemHit);
- break;
- } // switch
- return false; // not filtered => Dialog Manager takes it
- }
-
- //----------
- // modeless dialogs
-
- /*----------*/
- void InitModelessDialogs (void)
- {
-
- }
-
- /*----------*/
- void CloseModelessDialog (
- DialogPtr whichDialog)
- {
-
- }
-